Imaging apparatus, imaging method, image processing apparatus, and image processing method for a set execution condition

ABSTRACT

The present invention facilitates the setting of a condition for the execution of predetermined processing and enables the execution of processing conforming to a user&#39;s intention. In an image processing apparatus, a predetermined object is detected in an image selected based on an instruction from a user, a determination is made regarding an attribute of the detected object, and the determined attribute is set as an execution condition used when executing predetermined processing on an image.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to image processing technology, especiallyfor setting execution condition for executing a predeterminedprocessing.

2. Description of the Related Art

Conventionally, there is known to be imaging processing technology fordetecting feature points such as a person's eyes and mouth in an image,determining whether the person is smiling based on the arrangementrelationship between the detected feature points, and performing imagingif it has been determined that the person is smiling (e.g., see JapanesePatent Laid-Open No. 2005-266984). There is also known to be imagingprocessing technology for making a determination regarding the person'ssmile level, and performing imaging if it has been determined that thesmile level has reached a predetermined level set in advance by a user(e.g., see Japanese Patent Laid-Open No. 2008-311819).

In this way, in an imaging apparatus configured such that imagingprocessing is executed if a predetermined execution condition has beensatisfied, the user needs to set the execution condition (imagingcondition) for executing imaging processing in advance.

However, the imaging condition is not limited to merely “smiling” andthe “level” thereof, but rather includes various setting items such as“eyes are open” and “line of sight direction matches normal direction ofimaging area”. Even with the same item “smiling”, the “level” of smilingneeds to be further changed depending on the gender of the subject, suchas in the case of setting “smiling with mouth open” as an imagingcondition for men, and setting “classy smile with mouth closed” as animaging condition for women.

In this way, the imaging condition includes various setting items, andeven with the same setting item, the optimum value changes depending onthe situation, and therefore imaging condition setting is a very largeburden on the user with an imaging apparatus such as that describedabove.

Also, when setting an optimum value for a predetermined setting item, itis not easy for the user to express an intended image (the image to becaptured) using words, numbers, and the like. For example, if there werethe three options “high”, “medium”, and “low” when setting the smilelevel, it would be very difficult to determine to which smile “level”the item “classy smile with mouth closed” would correspond. For thisreason, the captured image may as a result differ from the image theuser intended to capture.

For such reasons, there is desire for an imaging apparatus thatfacilitates the setting of an imaging condition and furthermore enablesthe execution of imaging processing conforming to an image intended bythe user. Also, if execution condition setting is facilitated, andprocessing conforming to an image intended by the user is executed, itis conceivable for the present invention to be applicable to not onlyimaging processing, but also, for example, a search condition forsearching for an image, or a compositing condition for compositingimages. In other words, the present invention can be applied to thesetting of an execution condition for various types of processing.

SUMMARY OF THE INVENTION

The present invention has been achieved in view of the above-describedissues.

An image processing apparatus according to the present invention has thefollowing configuration. Specifically, an image processing apparatusaccording to the present invention includes: a detection unit configuredto detect a predetermined object in an image selected based on aninstruction from a user; a determination unit configured to determine anattribute of the detected object; and a condition setting unitconfigured to set the determined attribute as an execution condition forexecution of predetermined processing on the image.

The present invention facilitates the setting of an execution conditionused in the execution of predetermined processing, and enables executingprocessing conforming to a user's intention.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a diagram showing an overall configuration of an imageprocessing apparatus according to an embodiment of the presentinvention.

FIG. 2 is a diagram showing a functional configuration of an automaticcondition setting unit.

FIG. 3 is a flowchart showing the flow of automatic condition settingprocessing.

FIG. 4A is a diagram showing a functional configuration of an automaticsearch image selection unit.

FIG. 4B is a diagram showing a functional configuration of an automaticimage compositing unit.

FIG. 5A is a flowchart showing the flow of automatic search imageselection processing.

FIG. 5B is a flowchart showing the flow of automatic image compositingprocessing.

FIG. 6 is a diagram showing an overall configuration of an imagingapparatus according to an embodiment of the present invention.

FIG. 7A is a flowchart showing the flow of automatic condition settingprocessing.

FIG. 7B is a flowchart showing the flow of condition change processing.

FIG. 8 is a diagram showing a display unit and an operation unit of theimaging apparatus.

FIG. 9 is a flowchart showing imaging conditions set by automaticcondition setting processing.

FIG. 10 is a diagram showing imaging conditions that have been changedby condition change processing.

FIG. 11 is a flowchart showing the flow of automatic imaging processing.

FIG. 12 is a diagram showing a relationship between binary (smiling,not-smiling) determination threshold values and shift in smile level.

FIG. 13 is a flowchart showing the flow of condition setting processing.

FIG. 14 is a flowchart showing the flow of condition change processing.

FIG. 15 is a diagram showing imaging conditions that have been changedby condition change processing.

FIG. 16 is a diagram showing the case where an attribute value changedby condition change processing is displayed using a number line.

FIG. 17 is a diagram showing an example of a predetermined range of lineof sight directions that has been set as an imaging condition.

FIG. 18 is a diagram showing a relationship between binary (smiling,not-smiling) determination threshold values and predetermined ranges ofsmile levels.

FIG. 19 is a diagram showing the normal direction of an imaging area, adetected line of sight direction, and a predetermined range of line ofsight directions that has been set.

FIG. 20 is a flowchart showing the flow of condition setting processing.

FIG. 21 is a diagram showing the case where a predetermined rangechanged by condition change processing is displayed using numbers.

FIG. 22 is a diagram showing the case where a predetermined rangechanged by condition change processing is displayed using a number line.

DESCRIPTION OF THE EMBODIMENTS

Embodiments of the present invention will now be described in detail inaccordance with the accompanying drawings.

First Embodiment 1. Overall Configuration of Image Processing Apparatus

FIG. 1 is a diagram showing the overall configuration of an imageprocessing apparatus 100 according to an embodiment of the presentinvention. As shown in FIG. 1, the image processing apparatus 100includes a control memory (ROM) 101, a central processing unit 102, amemory (RAM) 103, an input apparatus 104, a display apparatus 105, andan external storage apparatus 106.

The external storage apparatus 106 includes an image storage unit 114that stores image data, and a control program for processing the imagedata stored in the image storage unit 114 (or image data stored onanother storage medium that is not shown). Under control of the centralprocessing unit 102, the control program and image data are retrieved asnecessary from the memory 103 via a bus 107, and the control program isexecuted by the central processing unit 102. Accordingly, the controlprogram functions as an automatic condition setting unit 111, anautomatic search image selection unit 112, and an automatic imagecompositing unit 113.

2. Functional Configuration of Automatic Condition Setting Unit

Next is a description of the functional configuration of the automaticcondition setting unit 111 in the image processing apparatus 100. Theautomatic condition setting unit 111 automatically sets an executioncondition for executing predetermined processing, such as a searchcondition for searching for an image or a compositing condition forcompositing images, based on an image designated by a user.

FIG. 2 is a diagram showing the functional configuration of theautomatic condition setting unit 111. As shown in FIG. 2, the automaticcondition setting unit 111 includes an image acquisition unit 201, anobject detection unit 202, an attribute detection unit 203, and acondition setting unit 204.

The image acquisition unit 201 acquires an image to be used in theautomatic setting of an execution condition such as a search conditionor a compositing condition from the external storage apparatus 106 oranother storage medium (e.g., a memory, a floppy (registered trademark)disk, a hard disk, a magnetic tape, a magneto-optical disk, or anonvolatile memory card).

The object detection unit 202 detects a target object in at least one ofthe images acquired by the image acquisition unit 201. Note that as oneexample of a technique for detecting an arbitrary object in an image,there is a technique employing a luminance gradient histogram. Note thatdetails of a technique employing a luminance gradient histogram aredisclosed in, for example, “A Discriminatively Trained, Multiscale,Deformable Part Model” by P. Felzenszwalb, D. McAllester, D. Ramanan, etal. (Proceedings of the IEEE CVPR, 2008).

In the present embodiment, the object detection unit 202 detects aperson's face as the target object. Note that examples of a techniquefor detecting a person's face as a target object include a techniqueemploying a neural network and a technique combining simple rectangularfilters. A technique employing a neural network is disclosed in, forexample, “Robust Face Detection System Based on Convolutional NeuralNetworks Using Selective Activation of Modules” by Yusuke Mitarai,Katsuhiko Mori, and Masakazu Matsugu (FIT (Forum on InformationTechnology), L1-013, 2003). Also, a technique combining simplerectangular filters is disclosed in, for example, “Rapid ObjectDetection using a Boosted Cascade of Simple Features” by P. Viola, M.Jones, et al, (Proc. Of CVPR, vol. 1, pp. 511-518, December, 2001).

Note that the target object detected by the object detection unit 202 isnot limited to be a person's face, and may be, for example, a person'sbody or an animal such as a dog or a cat.

The attribute detection unit 203 detects an attribute of the targetobject detected by the object detection unit 202. In the presentembodiment, a person's face is detected as the target object, andtherefore the attribute detection unit 203 detects a facial attribute.

The facial attribute may be, for example, a facial expression such as asmile, sad face, or angry face; line of sight direction or faceorientation; open/closed eyes; or a name specifying a person. In otherwords, the attribute detection unit 203 executes, on the face detectedby the object detection unit 202, determination processing regarding anexpression such as a smile, sad face, or angry face, determinationprocessing regarding the line of sight direction, determinationprocessing regarding the face orientation, determination processingregarding open/closed eyes, determination processing regarding a namespecifying a person, or the like. The following describes an outline ofthe processing content of the above determination processing.

In expression determination processing, the likelihood of an expression(feature amount) is calculated based on an amount of change from apre-provided reference image (e.g., see Japanese Patent Laid-Open No.2005-56388), and threshold value processing for comparing the calculatedlikelihood of an expression with a pre-provided threshold value isperformed. A determination regarding the facial expression is then madeby making, for example, a binary determination between smiling andnot-smiling.

In the line of sight direction determination processing, a determinationregarding the line of sight direction is made using the positions(feature amounts) of feature points such as the pupils and the eyes. Inthe face orientation determination processing, a determination regardingthe orientation of the face is facing is made using feature sites suchas the eyes and mouth. Note that details regarding line of sightdirection determination processing and face orientation determinationprocessing are disclosed in Japanese Patent Laid-Open No. 2008-210239,for example.

In the open/closed eyes determination processing, a determinationregarding open/closed eyes is made by calculating a change in area ratioor change in distance (feature amount) between the eyebrows and theeyes, and performing threshold value processing for comparing thecalculated value with a pre-provided threshold value (e.g., see JapanesePatent No. 3350296).

In the determination processing regarding a name specifying a person, adetermination regarding a name in a registered dictionary is made usingthe distance (feature amount) between patterns of multiple partial areasin the input image and a registered image (e.g., see Japanese Patent No.4161659).

Note that the processing content of the expression determinationprocessing, the line of sight direction determination processing, theface orientation determination processing, the open/closed eyesdetermination processing, and the determination processing regarding aname specifying a person is not limited to employing the techniquesdescribed above, and processing content using other techniques may beemployed. Also, the determination processing executed by the attributedetection unit 203 is not limited to the determination processingdescribed above, and other determination processing may be executed.

Note that if the target object detected by the object detection unit 202is a person's body, the attribute detection unit 203 detects a postureor the like as an attribute of the target object. Also, if the targetobject that was detected is an animal such as a dog or a cat, theattribute detection unit 203 detects a facial expression, a line ofsight direction, a facial type or the like as an attribute of the targetobject.

The condition setting unit 204 automatically sets an execution conditionsuch as a search condition for searching for an image or a compositingcondition for compositing images, based on the target object attributesdetected by the attribute detection unit 203. For example, the conditionsetting unit 204 is provided in advance with a table with pairs of anattribute and a flag indicating whether the attribute was detected(ON/OFF), and sets the flags corresponding to detected attributes to ON.

For example, if smiling was detected as a result of the expressiondetermination processing, the flag corresponding to that attribute(facial expression attribute) is set to ON. Also, if it was determinedthat the line of sight direction matches the normal direction from thecamera imaging area as a result of the line of sight directiondetermination processing, the flag corresponding to that attribute (eyeline of sight direction attribute) is set to ON. Furthermore, if it hasbeen determined that the eyes are open as a result of the open/closedeyes determination processing, the flag corresponding to that attribute(open/closed eyes attribute) is set to ON. Moreover, if it has beendetermined that the target object is person A as a result of thedetermination processing regarding a name specifying a person, the flagcorresponding to that attribute (name attribute) is set to ON. In thecase of a determination processing result other than those describedabove, the flag of the corresponding attribute is set to ON.

3. Flow of Automatic Condition Setting Processing

Next is a description of the flow of automatic condition settingprocessing performed by the automatic condition setting unit 111 withreference to FIG. 3. FIG. 3 is a flowchart showing the flow of automaticcondition setting processing.

As shown in FIG. 3, when the automatic condition setting processingstarts, in step S300 one or more images are selected from among imagesthat were acquired by the image acquisition unit 201 based on aselection instruction from the user. Specifically, the acquired one ormore images are images that the user selected, as images to be searchedfor, from among images displayed on the display apparatus 105.

In step S301, after the attribute detection unit 203 has performedattribute detection on the images selected in step S300, one of thedetected attributes is selected.

In step S302, the detection result obtained by the attribute detectionunit 203 for the attribute selected in step S301 is compared with apre-provided threshold value, and it is determined whether the detectionresult is greater than or equal to the threshold value. If it has beendetermined that the determination result is greater than or equal to thethreshold value, the procedure advances to step S303, in which the flagcorresponding to the attribute selected in step S301 is set to ON.However, if it has been determined that the determination result is notgreater than or equal to the threshold value, the procedure advances tostep S304, in which the flag corresponding to the attribute selected instep S301 is set to OFF.

In step S305, it is determined whether flag setting has been performedfor all of the attributes detected by the attribute detection unit 203,and the procedure advances to step S306 if it has been determined thatflag setting has been performed for all of the attributes. However, ifit has been determined that there is an attribute for which flag settinghas not been performed, the procedure returns to step S301, an attributefor which flag setting has not been performed is selected, and theabove-described processing is executed.

In step S306, it is determined whether the above-described processinghas been executed for all of the images acquired by the imageacquisition unit 201, and the procedure advances to step S307 if it hasbeen determined that the above-described processing has been executedfor all of the images. However, if it has been determined that there isan image for which the above-described processing has not been executed,the procedure returns to step S300, the next image is selected, and theabove-described processing is executed.

In step S307, it is determined whether only one image was acquired bythe image acquisition unit 201. If it has been determined that only oneimage was acquired by the image acquisition unit 201, the automaticcondition setting processing is ended.

However, if it has been determined that more than one image was acquiredby the image acquisition unit 201, the flags of the attributes of all ofthe images acquired by the image acquisition unit 201 are referenced,and a common flag is set to ON for an attribute whose flag is ON in allof the images.

For example, in the case where the image acquisition unit 201 acquirestwo images, the smiling flag among the attributes of the first image isON, and the smiling flag among the attributes of the second image isOFF, the common flag is set to OFF. Note that the processing for settinga common flag in the case where it has been determined that more thanone image was acquired by the image acquisition unit 201 is not limitedto this. For example, a configuration is possible in which the ratio ofthe number of images in which a flag is ON to the number of imagesacquired by the image acquisition unit 201 is calculated, and a commonflag is set based on the calculation result. Specifically, aconfiguration is possible in which, in the case where ten images wereacquired by the image acquisition unit 201, a common flag is set to ONif the smiling flag is ON for eight or more images.

In this way, the configuration is such that in the setting of anexecution condition such as a search condition or a compositingcondition, automatic setting is performed based on multiple attributesdetected in images designated by the user, rather than settings beingmanually set individually, thus enabling significantly reducing theburden of the setting operations performed by the user.

4. Functional Configuration of Automatic Search Image Selection Unit

Next is a description of the automatic search image selection unit thatapplies an execution condition set by automatic condition settingprocessing as a search condition, and searches for an image from theimage storage unit 114 or another storage medium. Note that examples ofthe other storage medium referred to here include a memory, a floppy(registered trademark) disk, a hard disk, a magnetic tape, amagneto-optical disk, and a nonvolatile memory card.

FIG. 4A is a diagram showing the functional configuration of theautomatic search image selection unit 112 that automatically selects asearch image based on a search condition automatically set by theautomatic condition setting unit 111.

As shown in FIG. 4A, the automatic search image selection unit 112includes an image acquisition unit 401, an object detection unit 402, anattribute detection unit 403, and a search image selection unit 404.

The image acquisition unit 401 acquires an image to be used in theselection of a search image from the image storage unit 114 or anotherstorage medium (e.g., a memory, a floppy (registered trademark) disk, ahard disk, a magnetic tape, a magneto-optical disk, or a nonvolatilememory card).

The object detection unit 402 executes target object detection on theimage acquired by the image acquisition unit 401.

The attribute detection unit 403 detects an attribute of the targetobject detected by the object detection unit 402. In the presentembodiment, in order to detect a person's face as the target object, theattribute detection unit 403 detects a facial attribute. Note that asdescribed above, the facial attribute may be, for example, a facialexpression such as a smile, sad face, or angry face; line of sightdirection or face orientation; open/closed eyes; or a name specifying aperson. A detailed description of the target object detection method andthe attribute detection method will not be given here since they havealready been described.

The search image selection unit 404 selects an image based on the resultof the detection performed by the attribute detection unit 403 and thesearch condition set by the automatic condition setting unit 111.

5. Flow of Automatic Search Image Selection Processing

Next is a description of the flow of automatic search image selectionprocessing performed by the automatic search image selection unit 112with reference to FIG. 5A. FIG. 5A is a flowchart showing the flow ofautomatic search image selection processing.

As shown in FIG. 5A, when the automatic search image selectionprocessing starts, in step S500 one or more images that satisfy acondition are selected from among search target images. For example, ifthe target object is a person's face, images including a person's faceare set as the search target images, and one or more images are selectedfrom among these search target images. If the target object is a dog,images including a dog are set as the search target images, and one ormore images are selected from among these search target images.

In step S501, it is determined whether the images selected in step S500match the search condition set by the automatic condition setting unit111. Specifically, it is determined whether the images match the searchcondition by referencing the attribute flags set by the automaticcondition setting unit 111.

If it has been determined that an image matches the search condition setby the automatic condition setting unit 111, the procedure advances tostep S502, in which the name of the image that matches the searchcondition and a directory name are stored. However, if it has beendetermined that the image does not match the search condition set by theautomatic condition setting unit 111, the procedure advances to stepS503.

In step S503, it is determined whether the above-described processinghas been executed on all of the search target images. If it has beendetermined that the above-described processing has been performed on allof the search target images, the procedure advances to step S504.However, if it has been determined that there is an image for which theabove-described processing has not been executed, the procedure returnsto step S500, and the next image is selected.

In step S504, all of the images that match the search condition aredisplayed by thumbnail display or the like, and the automatic searchimage selection processing is ended.

6. Functional Configuration of Automatic Image Compositing Unit

Next is a description of the functional configuration of the automaticimage compositing unit that applies an execution condition set by theautomatic condition setting unit as the compositing condition, acquiresimages from the image storage unit 114 or another storage medium, andgenerates a composite image.

FIG. 4B is a diagram showing the functional configuration of theautomatic image compositing unit 113 that generates a composite imagebased on a compositing condition automatically set by the automaticcondition setting unit 111.

As shown in FIG. 4B, the automatic image compositing unit 113 includesan image acquisition unit 411, an object detection unit 412, anattribute detection unit 413, and an image compositing unit 414.

The image acquisition unit 411 acquires images to be used in thegeneration of a composite image from the image storage unit 114 oranother storage medium (e.g., a memory, a floppy (registered trademark)disk, a hard disk, a magnetic tape, a magneto-optical disk, or anonvolatile memory card).

The object detection unit 412 executes target object detection on theimages acquired by the image acquisition unit 411.

The attribute detection unit 413 detects an attribute of the targetobject detected by the object detection unit 412. In the presentembodiment, in order to detect a person's face as the target object, theattribute detection unit 413 detects a facial attribute. Note that asdescribed above, the facial attribute may be, for example, a facialexpression such as a smile, sad face, or angry face; line of sightdirection or face orientation; open/closed eyes; or a name specifying aperson. A detailed description of the target object detection method andthe attribute detection method will not be given here since they havealready been described.

The image compositing unit 414 carries out compositing processing on theimages acquired by the image acquisition unit 411 based on thecompositing condition set by the automatic condition setting unit 111.The compositing processing can be carried out using a template that hasbeen stored in advance as disclosed in Japanese Patent Laid-Open No.2000-137789, for example. The compositing processing can also be carriedout using an average expression model as disclosed in Japanese PatentLaid-Open No. 10-91808, for example. For example, according to suchtechniques, in the case where a face with closed eyes has been set asthe compositing condition by the automatic condition setting unit 111,and an image with open eyes has been provided for compositing,compositing processing is used to generate an image of a face with openeyes from an image of a face with closed eyes that has been acquired bythe image acquisition unit 411.

7. Flow of Automatic Image Compositing Processing

Next is a description of the flow of automatic image compositingprocessing performed by the automatic image compositing unit 113 withreference to FIG. 5B. FIG. 5B is a flowchart showing the flow ofautomatic image compositing processing.

As shown in FIG. 5B, when the automatic image compositing processingstarts, in step S510 one image is selected from among compositing targetimages. For example, if the target object is a person's face, imagesincluding a person's face are set as the compositing target images, andone image is selected from among these compositing target images.

In step S511, compositing processing is performed on the image selectedin step S510 based on a compositing condition set by the automaticcondition setting unit 111. In step S512, it is determined whether thecompositing processing has been executed on all of the compositingtarget images. If it has been determined that the compositing processinghas been performed on all of the compositing target images, theprocedure advances to step S513. However, if it has been determined thatthere is an image for which the compositing processing has not beenexecuted, the procedure returns to step S510, and the next image isselected.

In step S513, the composite images are displayed by thumbnail display orthe like, and the automatic image compositing processing is ended.

As is clear from the above description, the image processing apparatusof the present embodiment is configured so as to detect an attribute inan image designated by the user, and automatically set an executioncondition such as an image search condition or an image compositingcondition based on the detected attribute.

Accordingly, when setting an execution condition such as an image searchcondition or an image compositing condition, the need for the user tomanually set settings individually is eliminated, and the user onlyneeds to designate a desired image. This consequently enablessignificantly reducing the burden of the setting operations performed bythe user, and enables setting an execution condition such as a searchcondition or a compositing condition intended by the user.

Second Embodiment

Although a configuration in which search processing or compositingprocessing is performed based on an execution condition that has beenautomatically set by the image processing apparatus is described in thefirst embodiment, the present invention is not limited to this. Aconfiguration is possible in which, for example, imaging processing isperformed by an imaging apparatus based on an execution condition thathas been automatically set. The following is a detailed description ofthe present embodiment.

1. Overall Configuration of Imaging Apparatus

FIG. 6 is a diagram showing the overall configuration of an imagingapparatus (electronic still camera) 600 according to an embodiment ofthe present invention.

In FIG. 6, reference sign 601 denotes an imaging lens group, andreference sign 602 denotes a light quantity adjustment apparatusincluding an aperture apparatus and a shutter apparatus. Reference sign603 denotes a CCD or CMOS imaging element that converts luminous fluxthat has passed through the imaging lens group and makes up a subjectimage into an electrical signal, and reference sign 604 denotes ananalog signal processing circuit that performs clamp processing and gainprocessing on analog signal output from the imaging element 603.Reference sign 605 denotes an analog/digital (hereinafter, referred toas A/D) converter that converts output from the analog signal processingcircuit 604 into a digital signal.

Reference sign 607 denotes a digital signal processing circuit thatperforms predetermined pixel interpolation processing and colorconversion processing on data from the A/D converter 605 or data from amemory control circuit 606. The digital signal processing circuit 607also performs predetermined arithmetic operations using captured imagedata.

Based on the results of the arithmetic operations, a system controlcircuit 612 performs TTL (Through-The-Lens) AF (Auto Focus) processing,AE (Auto Exposure) processing, and EF (Electronic pre-Flash) processingfor controlling an exposure control circuit 613 and a focus controlcircuit 614.

The digital signal processing circuit 607 also performs predeterminedarithmetic processing using captured image data, and performs TTL AWB(Auto White Balance) processing based on the obtained results of thearithmetic processing. The digital signal processing circuit 607furthermore executes, on the captured image data, target objectdetection processing in which, for example, a person's face is detected,and also executes determination processing on the detected face, such asexpression determination, line of sight direction determinationprocessing, open/closed eyes determination processing, and determinationprocessing regarding a name specifying a person. Note that an automaticcondition setting unit 621 and an automatic imaging processing unit 622of the present embodiment that execute various types of processingincluding the above-described determination processing are assumed to berealized in the digital signal processing circuit 607.

The memory control circuit 606 controls the analog signal processingcircuit 604, the A/D converter 605, the digital signal processingcircuit 607, a memory 608, and a digital/analog (hereinafter, referredto as D/A) converter 609. Accordingly, data resulting from A/Dconversion performed by the A/D converter 605 is written to the memory608 via the digital signal processing circuit 607 and the memory controlcircuit 606, or data resulting from A/D conversion performed by the A/Dconverter 605 is written to the memory 608 directly via the memorycontrol circuit 606.

The memory 608 stores data to be displayed by a display apparatus 610,and the data stored in the memory 608 is output to the TFT-type orLCD-type display apparatus 610 via the D/A converter 609 and displayed.The memory 608 can also store still images and video images that havebeen captured, and is provided with sufficient memory capacity to storea predetermined number of still images or a predetermined length ofvideo images. Accordingly, even in the case of capturing a panoramaimage or continuously shot images by capturing multiple still images insuccession, a large number of images can be written to the memory 608 athigh speed. The memory 608 can also be used as a work area for thesystem control circuit 612. Note that captured still images and videoimages may be written via an interface 611 to a storage medium such as aCD-ROM, a floppy (registered trademark) disk, a hard disk, a magnetictape, a magneto-optical disk, or a nonvolatile memory card.

The display apparatus 610 functions as an electronic finder bysuccessively displaying captured image data. The display apparatus 610can also arbitrarily turn displaying on/off in accordance with aninstruction from the system control circuit 612, and turning displayingoff enables significantly reducing power consumption over the case wheredisplaying is turned on. The display apparatus 610 also displays theoperating state and messages using characters and images in accordancewith the execution of a control program by the system control circuit612.

Reference sign 611 denotes an interface with a storage medium such as amemory card or a hard disk. Image data and management informationassociated therewith can be exchanged with a peripheral device such asanother computer or a printer using the interface 611. If the interface611 is configured so as to be compliant with the PCMCIA card standard orthe CF (Compact Flash (registered trademark)) card standard, connectionwith various types of communication cards is possible. Examples ofvarious types of communication cards include a LAN card, a modem card, aUSB card, an IEEE 1394 card, a P1284 card, an SCSI card, and a PHScommunication card.

The system control circuit 612 controls operation of the imagingapparatus 600 as a whole. A memory in the system control circuit 612stores constants, variables, programs, and the like for operationsperformed by the system control circuit 612 and for determinationprocessing. Note that it is possible to change these constants,variables, and programs stored in the memory in the system controlcircuit 612 using a CD-ROM, a floppy (registered trademark) disk, a harddisk, a magnetic tape, a magneto-optical disk, or a nonvolatile memorycard. Also, a configuration is possible in which data and programs foroperations performed by the system control circuit 612 and forperforming determination processing are executed by being loaded fromthe storage medium instead of being stored in the memory.

The exposure control circuit 613 controls the aperture apparatus and theshutter apparatus of the light quantity adjustment apparatus 602. Thefocus control circuit 614 controls focusing and zooming of the imaginglens group 601. The exposure control circuit 613 and the focus controlcircuit 614 are controlled using a TTL system, and are controlled by thesystem control circuit 612 using arithmetic operation results calculatedby the digital signal processing circuit 607 performing arithmeticprocessing on captured image data.

2. Flow of Automatic Condition Setting Processing

Next is a description of the flow of automatic condition settingprocessing performed by the automatic condition setting unit 621 of theimaging apparatus 600 with reference to FIG. 7A to FIG. 10. FIG. 7A is aflowchart showing the flow of automatic condition setting processing,and FIGS. 8 to 10 are diagrams showing a user interface of the imagingapparatus 600.

As shown in FIG. 7A, when the automatic condition setting processingstarts, in step S700 an automatic imaging condition setting mode istransitioned to based on a user instruction. Specifically, the automaticimaging condition setting mode for automatically setting an imagingcondition is selected by the user with use of a display unit 801 and anoperation unit 802 (FIG. 8) of the imaging apparatus 600, and thus theimaging apparatus 600 transitions to the automatic imaging conditionsetting mode.

When an automatic imaging condition setting mode 804 is selected in stepS700, the automatic imaging condition setting mode is transitioned to.An image captured by the user is then acquired from the CCD or CMOSimaging element 603. Alternatively, an image selected by the user isacquired from the interface 611 with a storage medium such as a memorycard or a hard disk. The acquired image is displayed by the display unit801 shown in FIG. 8. Note that it is assumed that the user canarbitrarily select, via the operation unit 802, whether the image to beused in the automatic setting of an imaging condition is to be acquiredfrom the CCD or CMOS imaging element 603 or to be acquired from theinterface 611 with a storage medium such as a memory card or a harddisk.

In step S702, target object detection is executed on the image acquiredin step S701. In step S703, an attribute is detected for the targetobject (face 803) detected in step S702. Here, in the presentembodiment, the attribute may be, for example, a facial expression suchas a smile, sad face, or angry face; line of sight direction or faceorientation; open/closed eyes; or a name specifying a person. Note thatthe attribute is not intended to be limited to this.

In step S704, an imaging condition is automatically set based on theresult of the detection of an attribute for the target object (face 803)in step S703. Note that attributes and set flags are displayed ascharacter information by the display unit 801 as shown in FIG. 9, so asto be able to be checked by the user (see reference sign 901).

In this way, the configuration is such that in the setting of an imagingcondition, automatic setting is performed based on attributes detectedin an image designated by a user selection, rather than attributes beingmanually set individually, thus enabling significantly reducing theburden of setting operations for the user. Also, in the case where theuser manually sets imaging conditions individually, it is difficult forthe user to grasp what sort of image will be captured as a result of thesetting. In contrast, employing a configuration in which the user isallowed to select an image as described above, the user can capture anintended image.

After automatic imaging condition setting ends in step S704, in stepS705 an inquiry is made to the user as to whether the user wishes tomanually change an automatically set imaging condition. Specifically, amessage such as “Change imaging conditions?” is displayed by the displayunit 801.

If the user gave an instruction for changing an imaging condition instep S705, the procedure moves to step S706. In step S706, changeprocessing (condition change processing) for, for example, adding ordeleting an imaging condition is performed. For example, as shown inFIG. 10, in the case where the user desires that the imaging conditions,namely that the facial expression is a smile, that the line of sightdirection is the normal direction of the camera imaging area, and thatthe eyes are open, are to be set for people other than person A as well,the name flag is changed from ON to OFF. Accordingly, automatic imagingprocessing is performed if, for everyone, the facial expression is asmile, the line of sight direction is the normal direction of the cameraimaging area, and the eyes are open (see reference sign 1001).

FIG. 7B is a flowchart showing details of the flow of this conditionchange processing (step S706). As shown in FIG. 7B, when the conditionchange processing starts, in step S710 it is determined whether the userhas selected an attribute that is to be added as an imaging condition ordeleted.

If it has been determined in step S710 that the user has selected anattribute, the procedure advances to step S711, in which it isdetermined whether the current flag of the attribute selected by theuser is OFF. If it has been determined in step S711 that the currentflag of the selected attribute is OFF, the procedure advances to stepS712, in which the flag of that attribute is change to ON. However, ifthe current flag of the selected attribute is ON, the procedure advancesto step S713, in which the flag of that attribute is changed to OFF.

In step S714, an inquiry is made to the user as to whether the conditionchange processing is to be ended. Specifically, a message such as “Endimaging condition change mode?” is displayed by the display unit 801. Ifan instruction for ending the condition change processing has beenreceived in step S714, the condition change processing is ended.However, if an instruction for ending the condition change processinghas not been received, the procedure returns to step S710.

Meanwhile, if the user gave an instruction for not changing an imagingcondition in step S705, the automatic condition setting processing isended.

3. Flow of Automatic Imaging Processing

Next is a description of the flow of automatic imaging processing forexecuting imaging processing based on an imaging condition set by theexecution of the automatic condition setting processing, with referenceto FIG. 11.

In step S1100, it is determined whether an instruction for startingautomatic imaging processing has been received from the user. Aninstruction for starting the automatic imaging processing as referred tohere means, for example, an operation in which a shutter button ispressed halfway. If it has been determined in step S1100 that aninstruction for starting automatic imaging processing has been received,the procedure advances to step S1101, in which an image is acquired fromthe CCD or CMOS imaging element 603.

In step S1102, a predetermined target object is detected in the imageacquired in step S1101. In the present embodiment, a person's face isdetected as the predetermined target object. In step S1103, attributedetection is performed for the target object (person's face) detected instep S1102.

In step S1104, it is determined whether the attributes detected in stepS1103 match the imaging conditions set in the automatic conditionsetting processing. For example, the determination as to whether thedetected attributes match the imaging conditions is made by referencinga table including pairs of an attribute and a flag indicating whetherthe attribute was detected (ON/OFF), which were set as the imagingconditions.

If it has been determined in step S1104 that the detected attributesmatch the imaging conditions, storage processing is executed for storingthe image acquired in step S1101 on a memory card via the interface 611.However, if it has been determined in step S1104 that the detectedattributes do not match the imaging conditions, the procedure advancesto step S1106.

In step S1106, it is determined whether the user has given aninstruction for ending the automatic imaging processing, and theautomatic imaging processing is ended if it has been determined thatsuch an instruction was given. However, if it has been determined thatthe user has not given an instruction for ending the automatic imagingprocessing, the procedure returns to step S1101.

As is clear from the above description, the imaging apparatus of thepresent embodiment is configured so as to detect an attribute in animage designated by the user, and automatically set an imaging conditionfor capturing an image based on the detected attribute.

Accordingly, when setting an imaging condition for capturing an image,the need for the user to manually set settings individually iseliminated, and the user only needs to designate a desired image. Thisconsequently enables significantly reducing the burden of the settingoperations performed by the user, and enables capturing an imageintended by the user.

Third Embodiment

In the configuration described in the second embodiment, if a detectedattribute is greater than or equal to a predetermined threshold value inautomatic condition setting processing, the flag of that attribute isset to ON. However, if an imaging condition has been set in this way,consequently a determination as to whether the detected attribute isgreater than or equal to a predetermined threshold value is made inautomatic imaging processing. However, a detected attribute is normallynot binary data, but rather is often multi-value data indicating thatchanges are continuous. For this reason, it is desirable that a valueset as an imaging condition is also multi-value data (instead of beingbinary data indicating ON/OFF). Further, a type of a person's facialexpression or a name etc may be set as an imaging condition.

In view of this, in the configuration of the present embodiment,multi-value data can be set as an imaging condition in the automaticsetting of imaging conditions in automatic condition setting processing.The following is a detailed description of the present embodiment. Notethat a description of the overall configuration of an imaging apparatusof the present embodiment has been omitted since it is similar to thatdescribed in the second embodiment.

1. Flow of Automatic Condition Setting Processing

First is a description of the flow of automatic condition settingprocessing of the present embodiment with reference to FIG. 7A.

In the automatic condition setting processing of the present embodiment,the processing from steps S700 to S703 is similar to the automaticcondition setting processing of the second embodiment, and therefore adescription of the processing of these steps will not be given.

In step S704, a value in accordance with an attribute detected in stepS703 (hereinafter, referred to as an “attribute value”) is set as theimaging condition. Specifically, if the detected attribute is smiling,and furthermore the smile level is high, an attribute value indicatingthat the smile level is high is set.

FIG. 12 is a graph showing a threshold value Sth that has been set inadvance and is used in the binary determination of smiling ornot-smiling, detected smile levels S, and faces 1200 to 1202respectively corresponding to the smile levels. If simply smiling hasbeen set as the imaging condition, an image capturing is performed whenit has been determined that a person is smiling. In other words, it ispossible for an image of the face 1201 having a low smile level to becaptured.

In contrast, if an attribute value has been set as the imagingcondition, not only is a determination made regarding the smilingattribute, but also a determination regarding the smile level is made,and therefore only an image of, for example, the face 1202 having a highsmile level can be captured. Note that details of the condition settingprocessing (step S704) of the present embodiment will be describedlater.

Let us now return to the description of FIG. 7A. In step S705, aninquiry is made to the user as to whether the user wishes to manuallychange an automatically set imaging condition. If the user gave aninstruction for changing an imaging condition in step S705, theprocedure moves to step S706. In step S706, condition change processingfor, for example, adding or deleting an imaging condition is performed.Note that in the case of the present embodiment, the imaging conditionsautomatically set in step S704 include both attributes for which flagsare set ON/OFF and attributes for which attribute values are set.Accordingly, in the condition change processing in step S706, changeprocessing is executed in accordance with the attributes (note thatdetails of the condition change processing (step S706) of the presentembodiment will be given later).

Meanwhile, if the user gave an instruction for not changing an imagingcondition in step S705, the automatic condition setting processing isended.

2. Flow of Condition Setting Processing

FIG. 13 is a flowchart showing the flow of condition setting processing(step S704) of the present embodiment.

In step S1310, one attribute indicated by a user instruction is selectedfrom among the various attributes detected in step S703.

In step S1311, it is determined whether the selected attribute valuedetected in step S703 is to be set as an imaging condition. If aninstruction for setting the attribute value selected in step S703 as animaging condition has been input, the procedure advances to step S1312,in which the attribute value detected in step S703 is set as an imagingcondition. However, if an instruction for not setting the attributevalue detected in step S703 as an imaging condition has been input, theprocedure advances to step S1313.

In step S1313, it is determined whether the determination regardingsetting as an imaging condition has been made for all of the attributevalues detected in step S703, and if there is an attribute value forwhich the determination regarding setting as an imaging condition hasnot been made, the procedure returns to step S1310. On the other hand,if the determination regarding setting as an imaging condition has beenmade for all of the attribute values, the condition setting processingends.

3. Flow of Condition Change Processing

FIG. 14 is a flowchart showing the flow of condition change processing(step S706) of the present embodiment.

In step S1411, it is determined whether the user has selected anattribute to be added or deleted or an attribute whose attribute valueis to be changed. If it has been determined in step S1411 that anattribute has been selected, the procedure advances to step S1412.

In step S1412, it is determined whether the flag of the selectedattribute is OFF. If it has been determined that the flag of theselected attribute is OFF, the procedure advances to step S1413, inwhich the flag is changed to ON, and thereafter the procedure advancesto step S1414.

In step S1414, an inquiry is made to the user as to whether the userwishes to change the attribute value as well, and an instruction isreceived from the user in response to the inquiry. Specifically, amessage such as “Change attribute value as well?” is displayed by thedisplay unit 801, and an instruction is received from the user inresponse to the message.

If it has been determined in step S1414 that an instruction for changingthe attribute value was received, the procedure advances to step S1415,in which the attribute value is changed. For example, the attributevalue may be changed using the attribute value detected in step S703, orthe attribute value may be changed manually by the user.

On the other hand, if it has been determined in step S1414 that aninstruction for changing the attribute value was not received, theprocedure advances to step S1419.

Meanwhile, if it has been determined in step S1412 that the flag of theselected attribute is not OFF, the procedure advances to step S1416. Instep S1416, an inquiry is made to the user as to whether the user wishesto change the attribute value, and an instruction is received from theuser in response to the inquiry. Specifically, a message such as “Changeattribute value as well?” is displayed by the display unit 801, and aninstruction is received from the user in response to the message.

If it has been determined in step S1416 that an instruction for changingthe attribute value was received, the procedure advances to step S1417,in which the attribute value is changed. For example, the attributevalue may be changed using the attribute value detected in step S703, orthe attribute value may be changed manually by the user.

Note that in the case where the user manually changes an attributevalue, the user directly changes an attribute value such as the smilelevel as shown in FIG. 15 (see reference sign 1501), for example.Alternatively, a configuration is possible in which a display includinga combination of a number line graph or the like and emoticons ispresented, and the attribute value is changed by moving an indicatorsuch as an arrow, as shown in FIG. 16 (see reference sign 1601). In thisway, by the user changing an attribute value such as the smile level, aface with a lower smile level than the face 1201 or a face with a highersmile level can be set as an imaging condition.

Meanwhile, if it has been determined in step S1416 that an instructionfor changing the attribute value was not received, the procedureadvances to step S1418, in which the flag of the attribute selected instep S1411 is changed to OFF.

In step S1419, an inquiry is made to the user as to whether thecondition change processing is to be ended, and an instruction isreceived from the user. Specifically, a message such as “End imagingcondition modification?” is displayed by the display unit 801, and aninstruction is received from the user in response to the message. If ithas been determined in step S1419 that an instruction for ending thecondition change processing was received, the condition changeprocessing is ended. On the other hand, if it has been determined thatan instruction for continuing the condition change processing wasreceived, the procedure returns to step S1411, and the next attribute isselected.

4. Flow of Automatic Imaging Processing

Next is a description of the flow of automatic imaging processing of thepresent embodiment with reference to FIG. 11. In the automatic imagingprocessing of the present embodiment, the processing from steps S1100 toS1103 is similar to the automatic imaging processing of the secondembodiment, and therefore a description of the processing of these stepswill not be given.

In step S1104, it is determined whether the attributes detected in stepS1103 match the imaging conditions set in the automatic conditionsetting processing or the imaging conditions changed in the conditionchange processing. Specifically, it is determined not only whether theflag of each attribute is ON/OFF, but also whether the attribute valueof each attribute matches the set attribute.

If it has been determined in step S1104 that the detected attributesmatch the set (or changed) imaging conditions, storage processing isexecuted for storing the image acquired in step S1101 on a memory cardvia the interface 611. However, if it has been determined in step S1104that the detected attributes do not match the set (or changed) imagingconditions, the procedure advances to step S1106.

In step S1106, it is determined whether the user has instructed theending of the automatic imaging processing, and the automatic imagingprocessing is ended if it has been determined that such an instructionwas received. However, if it has been determined that the user has notgiven an instruction for ending the automatic imaging processing, theprocedure returns to step S1100.

As is clear from the above description, the imaging apparatus of thepresent embodiment is configured so as to enable automatically settingnot only an attribute, but also an attribute value corresponding to theattribute as an imaging condition.

Accordingly, when setting an imaging condition for capturing an image,it is possible to set an imaging condition that is closer to the imagingcondition intended by the user, compared to the imaging apparatus of thesecond embodiment.

Note that the execution condition set by the automatic condition settingprocessing of the present embodiment may be used as not only an imagingcondition, but also as an image search condition.

Fourth Embodiment

Although a configuration in which not only an attribute, but also anattribute value are automatically set as an imaging condition inautomatic condition setting processing is described in the thirdembodiment, the present invention is not limited to this. For example, apredetermined range may be provided for an attribute value, and thepredetermined range may be set as an imaging condition. This is becausein the case where the target object is a person's face, a setting can besaid to be preferable as an imaging condition if, for example, theattribute value for the line of sight direction is in a predeterminedrange as indicated by 1700 to 1704 in FIG. 17. Based on such an imagingcondition, imaging processing is executed if the line of sight directionis within the predetermined range. The following is a detaileddescription of the present embodiment.

1. Flow of Automatic Condition Setting Processing

First is a description of the flow of automatic condition settingprocessing of the present embodiment with reference to FIG. 7A.

In the automatic condition setting processing of the present embodiment,the processing from steps S700 to S703 is similar to the automaticcondition setting processing of the second embodiment, and therefore adescription of the processing of these steps will not be given.

In step S704, it is determined whether the attribute detected in stepS703 and a predetermined range for the attribute are to be set as animaging condition. Specifically, in the case where the detectedattribute is smiling, a predetermined range (S±δS) is set based on thedetected attribute value (smile level S), as shown in FIG. 18.

Also, if the detected attribute value is line of sight direction, apredetermined range of line of sight directions in the pan direction(θp±δθp) is set as an imaging condition based on the detected line ofsight direction θp, as shown in FIG. 19 (only the pan direction isdisplayed). Similarly, although not shown in FIG. 19, a predeterminedrange of line of sight directions in the tilt direction (θt±δθt) is setas an imaging condition.

Note that in step S704, a predetermined range is not set for attributesfor which a predetermined range cannot be set, such as a name specifyinga person. Note that details of the condition setting processing (stepS704) of the present embodiment will be described later.

Let us now return to the description of FIG. 7A. In step S705, aninquiry is made to the user as to whether the user wishes to manuallychange an automatically set imaging condition. If the user gave aninstruction for changing an imaging condition in step S705, theprocedure moves to step S706. In step S706, condition change processingfor, for example, adding or deleting an imaging condition is performed.Note that in the case of the present embodiment, the imaging conditionsautomatically set in step S704 include both attributes for which flagsare set ON/OFF and attributes for which attribute values are set.Accordingly, in the condition change processing in step S706, changeprocessing is executed in accordance with the attributes (note thatdetails of the condition change processing (step S706) of the presentembodiment will be given later).

Meanwhile, if the user gave an instruction for not changing an imagingcondition in step S705, the automatic condition setting processing isended.

2. Flow of Condition Setting Processing

FIG. 20 is a flowchart showing the flow of condition setting processing(step S704) of the present embodiment.

In step S2000, one attribute is selected from among the variousattributes detected in step S703.

In step S2001, a predetermined range corresponding to the attributeselected in step S2000 is read out from a dictionary that has beenprovided in advance. Specifically, in the case where the attributeselected in step S2000 is smiling, the value of δS is read out, and inthe case where the selected attribute is line of sight direction, thevalues of δθp and δθt are read out.

In step S2002, a predetermined range is set for the attribute selectedin step S2000 using the attribute value detected in step S703 and thevalues read out in step S2001. Specifically, in the case where theattribute selected in step S2000 is smiling, the predetermined range(S±δS) is set for the smile level, and in the case where the selectedattribute is line of sight direction, the predetermined ranges (θp±δθp)and (θt±δθt) are set for the line of sight directions in the pan andtilt directions. Note that the result of automatically setting theattribute detected in step S703 and the predetermined rangecorresponding to the attribute as an imaging condition is displayed bythe display unit 801 as indicated by reference sign 2101 in FIG. 21.

In step S2003, it is determined whether the setting of a predeterminedrange has ended for all of the attribute values (all of the attributevalues for which a predetermined range can be set) detected in stepS703, and if it has been determined that there is an attribute for whicha predetermined range has not been set, the procedure returns to stepS2000. On the other hand, if it has been determined that the setting ofa predetermined range has ended for all of the attribute values, thecondition setting processing ends.

3. Flow of Condition Change Processing

Next is a description of the flow of condition change processing (stepS706) of the present embodiment with reference to FIG. 14.

The condition change processing of the present embodiment is basicallythe same as the condition change processing described with reference toFIG. 14 in the third embodiment. Note that in the case where the usermanually adjusts the predetermined range setting in step S1417, thepredetermined range for an attribute value such as the smile level maybe directly changed as shown in FIG. 21 (see reference sign 2101).Alternatively, a configuration is possible in which a display includinga number line graph or the like is presented, and the predeterminedrange is changed by moving indicators such as arrows, as shown in FIG.22 (see reference sign 2201).

Alternatively, a configuration is possible in which compositingprocessing is performed on images obtained in step S701, and thecomposite image is displayed, as disclosed in Japanese Patent Laid-OpenNo. 2000-137789 and Japanese Patent Laid-Open No. 10-91808. Note thatthe method of changing a predetermined range setting to serve as animaging condition is not limited to the above examples.

4. Flow of Automatic Imaging Processing

Next is a description of the flow of automatic imaging processing of thepresent embodiment with reference to FIG. 11. In the automatic imagingprocessing of the present embodiment, the processing from steps S1100 toS1103 is similar to the automatic imaging processing of the secondembodiment, and therefore a description of the processing of these stepswill not be given.

In step S1104, it is determined whether the attributes detected in stepS1103 match the imaging conditions set in the automatic conditionsetting processing or the imaging conditions changed in the conditionchange processing. Specifically, it is determined not only whether theflag of each attribute is ON/OFF, but also whether the attribute valueof each attribute lies in the set predetermined range.

If it has been determined in step S1104 that the detected attributesmatch the set (or changed) imaging conditions, storage processing isexecuted for storing the image acquired in step S1101 on a memory cardvia the interface 611. However, if it has been determined in step S1104that the detected attributes do not match the set (or changed) imagingconditions, the procedure advances to step S1106.

In step S1106, it is determined whether the user has instructed theending of the automatic imaging processing, and the automatic imagingprocessing is ended if it has been determined that such an instructionwas received. However, if it has been determined that the user has notgiven an instruction for ending the automatic imaging processing, theprocedure returns to step S1100.

As is clear from the above description, the imaging apparatus of thepresent embodiment is configured so as to enable automatically settingnot only an attribute as an imaging condition, but also a predeterminedrange for the attribute.

Accordingly, when setting an imaging condition for capturing an image,it is possible to set an imaging condition that is closer to the imagingcondition intended by the user, compared to the imaging apparatus of thesecond embodiment.

Note that the execution condition set by the automatic condition settingprocessing of the present embodiment may be used as not only an imagingcondition, but also as an image search condition.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiments, and by a method, the steps of whichare performed by a computer of a system or apparatus by, for example,reading out and executing a program recorded on a memory device toperform the functions of the above-described embodiments. For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2010-182589 filed Aug. 17, 2010, which is hereby incorporated byreference herein in its entirety.

What is claimed is:
 1. An imaging apparatus that executes recordingprocessing for recording an image captured by an imaging unit in astorage unit, comprising: an acquisition unit configured to, in acondition setting mode for setting an execution condition for therecording processing, acquire a plurality of sample images andconfigured to, in a recording mode for executing the recordingprocessing, acquire a captured image; a detection unit configured to, inthe condition setting mode, detect objects from the plurality of sampleimages and configured to, in the recording mode for executing therecording processing, detect an object from the captured image; anattribute determination unit configured to, in the condition settingmode, determine a type of common attribute which is common to at least apredetermined ratio of the objects detected from the plurality ofacquired sample images and configured to, in the recording mode forexecuting the recording processing, determine an attribute of the objectdetected from the captured image; a condition setting unit configuredto, in the condition setting mode, set the determined type of commonattribute as an execution condition for execution of the recordingprocessing; a condition determination unit configured to, in therecording mode for executing the recording processing, determine whetherthe attribute of the object detected from the captured image matches thedetermined type of common attribute which is set as the executioncondition; and an execution unit configured to record, in the recordingmode, the captured image in a memory if the attribute of the objectdetected from the captured image matches the determined type of commonattribute.
 2. The imaging apparatus according to claim 1, wherein theattribute determination unit determines, in the condition setting mode,whether the object has a predetermined attribute by comparing a featurequantity indicating a feature of the detected object with apredetermined threshold value, and the condition setting unit sets, inthe condition setting mode, a result of the determination for thepredetermined attribute as an execution condition for the recordingprocessing.
 3. The imaging apparatus according to claim 2, wherein theattribute determination unit determines, in the condition setting mode,whether the object has each of a plurality of attributes by comparing afeature quantity indicating a feature of each of the plurality ofattributes of the detected object with a predetermined threshold valuecorresponding to each of the plurality of attributes.
 4. The imagingapparatus according to claim 2, wherein the attribute determination unitdetermines, in the condition setting mode, corresponding attribute valuefrom the feature quantity indicating the feature of the detected objectand the condition setting unit further sets, in the condition settingmode, the attribute value or a predetermined range including theattribute value as an execution condition of the recording processing.5. The imaging apparatus according to claim 1, further comprising achange unit configured to change the execution condition for therecording processing that was set by the condition setting unit.
 6. Theimaging apparatus according to claim 1, wherein the object is a person'sface and a person's facial expression, at least one of a line of sightdirection, a face orientation, an open/closed eye state, and a name areincluded as attributes.
 7. The image processing apparatus according toclaim 6, wherein in a case where a plurality of images have beendisplayed based on an instruction from a user, the condition settingunit sets, among the determined attributes, the common attribute that iscommon to each of the displayed images as the execution condition forthe recording processing.
 8. An imaging method in a recording apparatusthat executes recording processing for recording an image captured by animaging unit in a storage unit, comprising: a first acquisition step ofacquiring, in a condition setting mode for setting an executioncondition for the recording processing, a plurality of sample images; afirst detection step of detecting, in the condition setting mode,objects from the plurality of sample images; a first attributedetermination step of determining, in the condition setting mode, a typeof common attribute which is common to at least a predetermined ratio ofthe detected objects from the plurality of sample images; a conditionsetting step of setting, in the condition setting mode, the determinedtype of common attribute as an execution condition for execution of therecording processing; a second acquisition step of acquiring, in arecording mode for executing the recording processing, a captured image;a second detection step of detecting, in the recording mode, an objectfrom the captured image; a second attribute determination step ofdetermining, in the recording mode, an attribute of the object detectedfrom the captured image; a condition determination unit step ofdetermining, in the recording mode, whether the attribute of the objectdetected from the captured image matches the determined type of commonattribute which is set as the execution condition; and an execution stepof recording, in the recording mode, the captured image in a memory ifthe attribute of the object detected from the captured image matches thedetermined type of common attribute.
 9. A non-transitorycomputer-readable medium encoded with a computer readable program which,when executed by a processor, will cause a computer to execute theimaging method according to claim 8.